The Elder Scrolls Forums

TES Construction Set and Plugins >> General TES Construction Set

Pages: 1
DarkOneVenzar
Diviner

Reged: 11/04/03
Posts: 2774
Loc: Realm of Darkness
Help- Scripting
      #2969963 - 08/25/04 06:15 PM

Ok I tried getting what I need from the MWSFD 8.0 but I failed. So this is what I am kindly asking for:

A script so that when the player picks up one of my new items the door to the room locks and a creature is spawned, it will be a custom creature. Then when the creature is killed the door opens, I do not want it to be lockpickable, the door I mean.

So can someone please help me out with this?

--------------------
7-Zip Forever!
Home of the 8-bit theater
Intellectua- Join today

Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: Help- Scripting [Re: DarkOneVenzar]
      #2970006 - 08/25/04 06:24 PM

The door needs to have a unique ID, lets call it "door_01". The creature needs to be from the creature lists, not the levelled lists, lstes say you make a unique creature "golden_saint_01".

On the item put this untested script

Code:
Begin PB_Summon_lock

short dead
short done

if ( OnActivate == 1 )
if ( done == 0 )
door_01->lock 100
PlaceatPC "golden_saint_01", 1, 250, 1
set done to 1
Activate
else
Activate
endif
endif

if ( dead == 0 )
if ( "golden_saint_01"->GetHealth < 1 )
door_01->unlock
Set dead to 1
endif
endif

end



Post Extras: Print Post   Remind Me!   Notify Moderator  
DarkOneVenzar
Diviner

Reged: 11/04/03
Posts: 2774
Loc: Realm of Darkness
Re: Help- Scripting [Re: ]
      #2970033 - 08/25/04 06:29 PM

Does that amke the door impossible to lockpick? Because I do not want some sneaky theif type to just unlock it and walk out. I want them to have to figh tthe creature that gets spawned.

--------------------
7-Zip Forever!
Home of the 8-bit theater
Intellectua- Join today

Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: Help- Scripting [Re: DarkOneVenzar]
      #2970059 - 08/25/04 06:34 PM

Quote:

Does that amke the door impossible to lockpick? Because I do not want some sneaky theif type to just unlock it and walk out. I want them to have to figh tthe creature that gets spawned.




Ok, easy enough

On the door, put this untested script

Code:
Begin PB_unpickable

if ( Onactivate == 1 )
if ( GetDeadCount "golden_Saint_01" < 1 )
Messagebox "The door remains magically sealed" "OK"
Playsound3d "lockeddoor"
else
Activate
endif
endif

end



This way, your sneaky thief wont discover he cant get out intil he has picked the door

Post Extras: Print Post   Remind Me!   Notify Moderator  
DarkOneVenzar
Diviner

Reged: 11/04/03
Posts: 2774
Loc: Realm of Darkness
Re: Help- Scripting [Re: ]
      #2970063 - 08/25/04 06:35 PM

Ok that script I put on the door doesn't even let the player get into the room. Is there a way to get it started after the one on th eitem is activated? Or another possible way?

--------------------
7-Zip Forever!
Home of the 8-bit theater
Intellectua- Join today

Post Extras: Print Post   Remind Me!   Notify Moderator  
TheSlof
Curate

Reged: 03/16/04
Posts: 425
Loc: Trollhättan, Sweden
Re: Help- Scripting [Re: DarkOneVenzar]
      #2971410 - 08/26/04 02:24 AM

You could do this with a Global.. Or put the door-script as a part of the OnActivate-script for the item..

eg.

Code:
 

begin lockthedoor
short state

if ( state == 0 )
if ( OnActivate == 1 )
PlaceatPC "golden_saint_01", 1, 250, 1
set state to 1
endif
endif
if ( door_id->OnActivate == 1 )
if ( state == 0 )
Activate
elseif ( state == 1 )
Messagebox "The door remains magically sealed" "OK"
Playsound3d "lockeddoor"
if ( state == 2 )
Activate
endif
endif
if ( state == 1 )
if ( GetDeadCount "golden_Saint_01" < 1 )
set state to 2
endif
endif



I think this should work...

--------------------
My tutorials:
Here or here!
||||||

Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: Help- Scripting [Re: DarkOneVenzar]
      #2971456 - 08/26/04 02:51 AM

Quote:

Ok that script I put on the door doesn't even let the player get into the room. Is there a way to get it started after the one on th eitem is activated? Or another possible way?




Apologies for that, I forgot that the creature wouldnt be dead yet before you enter.

Either do what the Slof suggests above or insert into the item script, in the OnActivate block in the same part where the door->lock comand is.....

set door_01.state to 1

Then, alter the door script

short state

if ( OnActivate == 1 )
if ( state == 0 )
Activate
elseif ( state == 1 )
if ( GetDeadCount "Golden_Saint_01" < 1 )
Messagebox "this door etc etc" "OK"
Playsound3d "lockeddoor"
elseif ( getDeadCount "golden_saint_01" > 0 )
Activate
endif
endif
endif

end

This way, the item script updates the variable 'state' on the door whe it is activated. until the item is activated, the door behaves normally, but once the item has been activated, the golden saint or whatever must be dead before the door can be activated again.

Hope that helps

Post Extras: Print Post   Remind Me!   Notify Moderator  
DarkOneVenzar
Diviner

Reged: 11/04/03
Posts: 2774
Loc: Realm of Darkness
Re: Help- Scripting [Re: ]
      #2972217 - 08/26/04 11:16 AM

Ok I have the scripts working right but now I have this problem. So if anyone knows how to fix it up let me know since I need it to work right. I have tried many things but no to avail.

--------------------
7-Zip Forever!
Home of the 8-bit theater
Intellectua- Join today

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1


Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:  Umrahel, Freddo, Pete, Hungry Donner, Attrebus, Miltiades, tegger 

Print Thread

Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 89

Rate this thread
 
Jump to

The Elder Scrolls Homepage

*
UBB.threads™ 6.3

Click for Privacy Statement © 2003 Bethesda Softworks LLC, a ZeniMax Media company. All Rights Reserved.
PRIVACY POLICY | TERMS & CONDITIONS | LEGAL INFORMATION | CONTACT US